package com.player.rest.exception;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import com.player.rest.util.ResponseConverter;

public class ServiceException extends WebApplicationException {

	private static final long serialVersionUID = 235474735691699352L;

	public ServiceException(Status responseStatus, FaultInfo faultInfo) {
		// FIXME log?
		super(Response.status(responseStatus).entity(ResponseConverter.toJSON(faultInfo)).build());
	}

}
